package com.prs.crm.domain.purchase;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.prs.crm.domain.BaseEntity;
import com.prs.crm.domain.stock.Product;

@Entity
@Table(name = "purchase_purchaseOrderDetail")
public class PurchaseOrderDetail extends BaseEntity {

	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;

	@ManyToOne
	private PurchaseOrder purchaseOrder;

	@ManyToOne
	private Product product;
	/**
	 * 产品名称
	 */
	private String producName;
	/**
	 * 订单数量
	 */
	private int stockNum;

	/**
	 * 市场价
	 */

	private Double markprice;
	/**
	 * 订单的实际单价
	 */
	private Double price;

	/**
	 * 折扣
	 */
	private Double discount;

	/**
	 *订单的总价
	 */

	private Double totolMonly;
	/**
	 * 以入库数量
	 */
	@Column(columnDefinition = "Integer(11) default '0'")
	private int inNum;
	/**
	 * 入库完成状态0，为完成，1已完成
	 */
	@Column(columnDefinition = "Integer(11) default '0'")
	private int inType;
	/**
	 * 退回数量
	 */
	@Column(columnDefinition = "Integer(11) default '0'")
	private int returnNum;
	/**
	 * 退回数量 0为完成 1已经完成
	 */
	@Column(columnDefinition = "Integer(11) default '0'")
	private int returnState;
	/**
	 * 付钱数量
	 * 
	 * @return
	 */
	@Column(columnDefinition = "Integer(11) default '0'")
	private int payNum;
	/**
	 * 付钱状态 0没有完成 1完成
	 * 
	 * @return
	 */
	@Column(columnDefinition = "Integer(11) default '0'")
	private int payState;

	public Integer getId() {
		return id;
	}

	public int getPayNum() {
		return payNum;
	}

	public void setPayNum(int payNum) {
		this.payNum = payNum;
	}

	public int getPayState() {
		return payState;
	}

	public void setPayState(int payState) {
		this.payState = payState;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public PurchaseOrder getPurchaseOrder() {
		return purchaseOrder;
	}

	public void setPurchaseOrder(PurchaseOrder purchaseOrder) {
		this.purchaseOrder = purchaseOrder;
	}

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public String getProducName() {
		return producName;
	}

	public void setProducName(String producName) {
		this.producName = producName;
	}

	public int getStockNum() {
		return stockNum;
	}

	public void setStockNum(int stockNum) {
		this.stockNum = stockNum;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public Double getDiscount() {
		return discount;
	}

	public void setDiscount(Double discount) {
		this.discount = discount;
	}

	public Double getTotolMonly() {
		return totolMonly;
	}

	public void setTotolMonly(Double totolMonly) {
		this.totolMonly = totolMonly;
	}

	public Double getMarkprice() {
		return markprice;
	}

	public void setMarkprice(Double markprice) {
		this.markprice = markprice;
	}

	public int getInNum() {
		return inNum;
	}

	public void setInNum(int inNum) {
		this.inNum = inNum;
	}

	public int getInType() {
		return inType;
	}

	public void setInType(int inType) {
		this.inType = inType;
	}

	public int getReturnNum() {
		return returnNum;
	}

	public void setReturnNum(int returnNum) {
		this.returnNum = returnNum;
	}

	public int getReturnState() {
		return returnState;
	}

	public void setReturnState(int returnState) {
		this.returnState = returnState;
	}

}
